/**
 * Create by CaoWenjian
 *
 * @copyRight: 2018
 **/
package com.bjboot.caocao.common.quartz;

import com.bjboot.caocao.system.domain.TaskDO;
import com.bjboot.caocao.system.pojo.TaskJobPojo;

/**
 *@Description ScheduleJOb工具类，将对应的Domain转换为Pojo
 *@Author 操文健
 *@Date 2018-09-20 下午2:47
 *@Version 1.0
 **/
public class ScheduleJobUtils {
    public static TaskJobPojo entityToData(TaskDO scheduleJobEntity) {
        TaskJobPojo scheduleJob = new TaskJobPojo();
        scheduleJob.setBeanClass(scheduleJobEntity.getBeanClass());
        scheduleJob.setCronExpression(scheduleJobEntity.getCronExpression());
        scheduleJob.setDescription(scheduleJobEntity.getDescription());
        scheduleJob.setIsConcurrent(scheduleJobEntity.getIsConcurrent());
        scheduleJob.setJobName(scheduleJobEntity.getJobName());
        scheduleJob.setJobGroup(scheduleJobEntity.getJobGroup());
        scheduleJob.setJobStatus(scheduleJobEntity.getJobStatus());
        scheduleJob.setMethodName(scheduleJobEntity.getMethodName());
        scheduleJob.setSpringBean(scheduleJobEntity.getSpringBean());
        return scheduleJob;
    }
}
